<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>淅淅的读书记录</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="/bootstrap-datepicker/css/bootstrap-datepicker3.min.css" rel="stylesheet">
    <link href="/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="/bootstrap-validator/css/bootstrapValidator.min.css" rel="stylesheet"/>
    <link href="/css/index.css" rel="stylesheet">
    <!--[if lt IE 9]>
    <script src="/js/html5shiv.min.js"></script>
    <script src="/js/respond.min.js"></script>
    <![endif]-->
    <link href="/favicon.ico" rel="icon">
</head>
<body>
<div class="container">
    <div class="header clearfix">
        <ul class="nav nav-pills pull-right">
            <li role="presentation" class="active"><a href="/list">记录</a></li>
            <li role="presentation"><a href="/statistic">统计</a></li>
        </ul>
        <h3 class="text-muted">
            淅淅的读书记录
        </h3>

    </div>
    <div class="row recording">
        <div class="col-md-6 col-md-offset-3 input-group date" id="dateselect-div">
            <input type="text" class="form-control" placeholder="选择日期" id="dateselect-input" name="dateselected"
                   value="{{dateselected}}" readonly>
            <span class="input-group-addon">
                    <i class="glyphicon glyphicon-th"></i>
            </span>
        </div>
        <div class="col-md-12" id="booktable-div">
            <table id="booktable"></table>
        </div>

        <div class="col-sm-12" id="booksubmitform-div">
            <form class="form-horizontal" role="form" id="booksubmitform">
                <div class="form-group">
                    <label for="booksubmitforme-input-bookname" class="col-sm-2 control-label">书名</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" id="booksubmitforme-input-bookname" name="bookname"
                               placeholder="输入书名" required>
                    </div>
                </div>

                <div class="form-group">
                    <label for="booksubmitforme-select-bookcategory" class="col-sm-2 control-label">分类</label>
                    <div class="col-sm-9">
                        <select class="form-control" id="booksubmitforme-select-bookcategory" name="bookcategory">
                            {{#categoryOptions}}
                                <option value="{{getKey}}">{{getValue}}</option>
                            {{/categoryOptions}}
                        </select>
                    </div>
                </div>
                <button class="btn btn-primary" type="button" onclick="addbook()" id="booksubmit-button">增加</button>
            </form>
        </div>
    </div>
    <footer class="footer">
        <a href='https://gitee.com/shilfer/reading-record'><img src='https://gitee.com/shilfer/reading-record/widgets/widget_6.svg' alt='Fork me on Gitee'></a>
    </footer>
</div>

<div class="modal fade" id="bookdelete-confirm-dialog" tabindex="-1" role="dialog" aria-labelledby="bookdeleteconfirm" aria-hidden="true">
    <form action="/del" method="post">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h4 class="modal-title">注意</h4>
                </div>
                <div class="modal-body">
                    <input class="form-control" type="hidden" name="bookid" id="bookdelete-modal-dialog-bookid" value=""/>
                    <p id="bookdelete-confirm-dialog-content">确认删除？</p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="deletebookbyid()">确定</button>
                </div>
            </div>
        </div>
    </form>
</div>

<div class="modal fade" id="request-result-dialog" tabindex="-1" role="dialog" aria-labelledby="requestresult" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">信息</h4>
            </div>
            <div class="modal-body">
                <p id="request-result-dialog-content"></p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">好的</button>
            </div>
        </div>
    </div>
</div>

<script src="/js/jquery-3.5.1.min.js"></script>
<script src="/bootstrap/js/bootstrap.min.js"></script>
<script src="/bootstrap-datepicker/js/bootstrap-datepicker.min.js"></script>
<script src="/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<script src="/bootstrap-table/bootstrap-table.min.js"></script>
<script src="/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script src="/bootstrap-validator/js/bootstrapValidator.min.js"></script>
<script src="/js/index.js"></script>
</body>
</html>
